
module.exports = function ($scope, $resource, $modalInstance, item, auditFlag) {
    
    $scope.item = item;
    $scope.auditFlag = auditFlag;
    $scope.result = function(tag) {
        var msg = tag == '1' ? '游团信息无误, 确认审核通过吗?' : '企业信息不正确, 驳回奖励申请!';
        if(confirm(msg)){
            var para = {
                'company_code': item.company_code,
                'result': tag,
                'result_info': item.result_info
            }
            $resource('/api/ac/atc/auditReportService/setExamineStatus', {}, {}).save(para, function(res){
                if (res.errcode === 0) {
                    $modalInstance.close(tag);
                } else {
                    toaster.error({title: '', body: res.errmsg});
                }
            });
        }
    }


};